package com.sjq.mapper;

import com.sjq.model.request.RoleDto;
import com.sjq.model.request.UserDto;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * RoleMapper
 * @author dolyw.com
 * @date 2021/12/31 14:42
 */
public interface RoleMapper extends Mapper<RoleDto> {
    /**
     * 根据User查询Role
     * @param userDto
     * @return java.util.List<com.sjq.model.request.RoleDto>
     * @author dolyw.com
     * @date 2021/12/31 11:30
     */
    List<RoleDto> findRoleByUser(UserDto userDto);

    /**
     * 根据用户id联表查询用户角色
     * @param userId
     * @return
     */
    String gerRoleByUserId(long userId);
}
